library(raster)
library(sf)
source('https://raw.githubusercontent.com/oharac/src/master/R/common.R')
source(here('common_fxns.R'))
library(animation)
reload <- FALSEUsing the impact category level global maps, aggregate species impacts to country level. We may also want to aggregate to marine ecoregion level.
Pull in EEZ raster and MEOW raster, and assemble into a dataframe. Include ocean area for area-weighted averaging.
Define a function to bring in all rasters (by year) of an impact, and place into dataframe format. From the raster filename, extract the stressor/impact and the year.
Plot the results based on the percent of local threatened species impacted by each impact category.
Plot the results based on the percent of local threatened species impacted by each impact category.